/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 刘远望
 * Date: 2025-05-01
 * Time: 12:14
 */
class Message<T> {
    private T message ;

    public T getMessage() {
        return message;
    }

    public void setMessage(T message) {
        this.message = message;
    }

}
public class TestDemo {

    public static void fun(/*这里的类型接收*/Message<?> temp) {
        System.out.println(temp.getMessage());
    }

    public static void main(String[] args) {
        Message<String> message1 = new Message<>();
        Message<Integer> message2 = new Message<>();

        message1.setMessage("i love china");
        message2.setMessage(99);
        fun(message1);
        fun(message2);
    }
}
